x={4256,12482,482,489,2451,854,851863,282,42,8}
for i=1,#x do	
	a=x[i]
	for j=i,#x do
		if(a>x[j]) then
			a=x[j]
			index=j
		end	
	end
x[index]=x[i]
x[i]=a
end

for i=1,#x do
	print('x[' .. i .. ']=' .. x[i])
end
